package com.tju.eduservice.config;

import java.io.IOException;
import java.util.ArrayDeque;
import java.util.PriorityQueue;
import java.util.concurrent.ExecutionException;

public class AtomTest implements Cloneable{


    public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException, ExecutionException {
        PriorityQueue<Integer> queue = new PriorityQueue<>((o1,o2) -> o2 - o1);
        for (int i = 0; i < 23; i++) {
            queue.offer(i);
            if(queue.size() > 6){
                queue.poll();
            }
        }
        ArrayDeque<Integer> deque = new ArrayDeque<>();
        deque.poll();
        deque.pollLast();
        System.out.println(queue.poll());
        System.out.println(queue);

    }


}

